* {
    margin: 0;
    padding: 0;
    list-style: none;
    user-select: none;
}
.chess.last-move {
    box-shadow: 0 0 0 2px #ffcc00;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from {
        box-shadow: 0 0 0 2px #ffcc00;
    }
    to {
        box-shadow: 0 0 0 4px #ffcc00;
    }
}
.container {
    width: 500px;
    height: 500px;
    background-color: rgb(247, 230, 183);
    border: 1px solid rgb(207, 188, 188);
    margin: 40px auto;
    padding: 1%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container-content {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
}

.container-content td {
    border: 1px solid #000;
    position: relative;
    cursor: pointer;
}

.chess {
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 1px solid lightgrey;
    position: absolute;
    left: -50%;
    top: -50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: lightgrey;
}

.white {
    background-color: white;
}

.black {
    background-color: black;
}

.container .container-content td .win {
    border: 1px solid red;
    box-shadow: 0 0 3px 2px red;
}

.container-end {
    display: none;
    position: fixed;
    left: 0px;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .5);
}

.end-content {
    width: 300px;
    height: 300px;
    background-color: rgb(102, 95, 115);
    margin: 80px auto;
    position: relative;
}

.end-container-color {
    font-weight: bold;
}

.end-top {
    text-align: center;
    font-size: 25px;
    padding: 15px;
    font-weight: bold;
    color: rgb(185, 33, 33);
}

.end-container {
    text-align: center;
    font-size: 18px;
}

.end-bottom-container {
    text-align: center;
    font-size: 20px;
    color: rgb(4, 20, 250);
    padding: 20px;
}

.end-bottom {
    position: absolute;
    left: 0;
    bottom: 40px;
    width: 100%;
}

.end-bottom span {
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #1a73e8;
    border-radius: 5px;
    padding: 4px 8px;
    transition: all .8s;
}

.end-yes {
    float: left;
    margin-left: 10px;
}

.end-no {
    float: right;
    margin-right: 10px;
}

.end-bottom span:hover {
    background-color: #1a73e8;
    color: #fff;
}

.panel {
    width: 500px;
    margin: 40px auto;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
}
.timer {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

.game-info {
    margin-top: 15px;
    font-size: 0.8rem;
    color: #666;
}
.game-info p {
    margin: 5px 0;
}

select, button {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 14px;
    flex: 1;
    min-width: 120px;
}
button {
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}
button:hover {
    background-color: #45a049;
}
button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 图表容器样式 */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px auto;
    max-width: 800px;
    flex-wrap: wrap;
}

#chess-count-chart, 
#win-rate-chart {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 10px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .stats-container {
        flex-direction: column;
        align-items: center;
    }
}
